/* ========================================================================= */
/* ------------------------------------------------------------------------- */
/*!
  \file			main.h
  \date			Aug 2011
  \author		TNick

  \brief		Contains definitions for general elements

*//*

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Please read COPYING and README files in root folder
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

*/
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
#ifndef __MAIN_INC__
#define __MAIN_INC__
//
//
//
//
/*  INCLUDES    ------------------------------------------------------------ */

#include <QtCore/QtGlobal>

/*  INCLUDES    ============================================================ */
//
//
//
//
/*  DEFINITIONS    --------------------------------------------------------- */


/// the name of the application
#define		APP_NAME			"AiTry"

/// the version of the application
#define		APP_VER				"1.0.0"

/// when defined, enables extended internal checks
#define		INTERNAL_CHECKS			1

/// describes the result of a function
enum	OUTCOME			{
	OUTCOME_WARNING = -1,
	OUTCOME_OK = 0,
	OUTCOME_ERROR = 1
};

#define		OUT_SUCCESS( o )	( o != OUTCOME_ERROR )
#define		OUT_FULL_SUCCESS( o )	( o == OUTCOME_OK )

#if defined(MAIN_LIB_BUILD)
#  define		EXPORT Q_DECL_EXPORT
#else
#  define		EXPORT Q_DECL_IMPORT
#endif




#ifdef	_MSC_VER

/* maybe a specific version should be checked here; using the target
  MSVC2008 isnan, part of the standard, are not found */
#include	<float.h>
#define		isnan	_isnan
#define		isinf(x)	(_finite(x) == 0)

#endif


/*  DEFINITIONS    ========================================================= */
//
//
//
//
/*  DATA    ---------------------------------------------------------------- */


/*  DATA    ================================================================ */
//
//
//
//
/*  FUNCTIONS    ----------------------------------------------------------- */
#ifdef __cplusplus

/**
*	@brief	entry point for the library
*
*	This only returns when the program should end
*
*/
EXPORT	int		lib_main				( int argc, char *argv[] );


class	UserMsg;

extern bool		GUI_isCmdLogVisible		( void );
extern void		GUI_showCmdLog			( void );
extern void		GUI_showCmdLogMessage	( UserMsg * p_msg );
extern void		GUI_showPopUpMessage	( UserMsg * p_msg );

extern bool		SETTINGS_Init			( void );
extern bool		MESSAGES_Init			( void );
extern void		MESSAGES_end			( void );
extern void		ErrorReport				( QString s_msg );
extern void		WarningReport			( QString s_msg );

#endif
/*  FUNCTIONS    =========================================================== */
//
//
//
//
#endif // __MAIN_INC__
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
